<?php

class Debug
{
    public static function info($message)
    {
        self::log("INFO", $message, "info");
    }

    public static function error($message)
    {
        self::log("ERROR", $message, "error");
    }

    public static function warning($message)
    {
        self::log("WARNING", $message, "warning");
    }

    private static function log($level, $message, $styleClass)
    {
        $timestamp = date("Y-m-d H:i:s");
        $formattedMessage = "<span style='color: black'>[$timestamp]</span> [$level] $message";

        // Output with color using CSS class
        echo '<div class="' . $styleClass . '">' . $formattedMessage . '</div>';
        echo '<style>
    .info {
        color: green;
    }

    .error {
        color: red;
    }

    .warning {
        color: orange;
    }
</style>';
    }
}